<?php $this->load->view('admin/introdution/link_bar'); ?>
<form method="post" action="{site_url}admin/introdution/delete" class="form">
    <div class="box_function">
        <table width="747" border="0" cellpadding="0" cellspacing="0" class="listproduct" id="listproduct">
            <tr>
                <td class="tilte_list_pro">
                    <input name="checkme" class="noborder" onclick="checkDelBoxes(this.form, 'categoryBox[]', this.checked)" type="checkbox">
                </td>
                <td class="tilte_list_pro">
                    ID<br>

                </td>
                <td class="tilte_list_pro">
                    Name (Vietnamese)<br>
                </td>
                <td class="tilte_list_pro">
                    Name (English)
                </td>
                <td class="tilte_list_pro">
                    Displayed
                </td>
                <td class="tilte_list_pro" style="width: 62px;">
                    Actions
                </td>
            </tr>

            <?php
            for ($i = 0; $i < count($rows); $i++) {
                $id = $rows[$i]->id_introdution;
                $name = $rows[$i]->vi_name;
                $description = $rows[$i]->vi_name;
                $enlable = $rows[$i]->active == 1 ? 'checked.jpg' : 'nocheck.jpg';
                $id_next = $rows[$i]->id_next;
                $id_preview = $rows[$i]->id_preview;
                //$items .= eval ($this->loadTemplate('admin/introdution/introdution_item.tpl'));
                if ($i % 2 == 0)
                    $css_class = 'row1';
                else
                    $css_class = 'row2';
                ?>
                <tr onMouseOver="" class="<?php echo $css_class ?>">
                    <td class="product center">
                        <input name="categoryBox[]" value="<?php echo $id ?>" class="noborder" type="checkbox"></td>
                    <td class="product center" onclick="document.location = '#'">
    <?php echo $id ?>
                    </td>

                    <td class="product" onclick="document.location = '#'">
                        <?php echo $name ?>
                    </td>
                    <td class="product" onclick="document.location = '#'">
    <?php if ($id_next/* $order_view < $max_position AND isset($rows[$i+1]) */) { ?>
                            <a href="<?php echo site_url() ?>/admin/introdution/change_order/<?php echo $id . '/' . $id_next; ?>">
                                <img src="<?php echo base_url() ?>images/admin/down.gif" alt="Up" title="Up" border="0">
                            </a>
                        <?php
                        }
                        if ($id_preview/* $order_view > $min_position AND isset($rows[$i-1]) */) {
                            ?>
                            <a href="<?php echo site_url() ?>/admin/introdution/change_order/<?php echo $id . '/' . $id_preview; ?>">
                                <img src="<?php echo base_url() ?>images/admin/up.gif" alt="Down" title="Down" border="0">
                            </a>
    <?php } ?>	
                    </td>
                    <td class="product center" onclick="document.location = '#'">
                        <img src="<?php echo base_url() . 'images/admin/' . $enlable ?>">
                    </td>
                    <td class="product center">
                        <a href="<?php echo site_url('admin/introdution/edit/' . $id) ?>">
                            <img src="<?php echo base_url();?>images/admin/edit.gif" alt="Edit" title="Edit" border="0">
                        </a>
                        <a href="<?php echo site_url('admin/introdution/delete/' . $id); ?>" onclick="return confirm('Delete item #<?php echo $id ?>?');">
                            <img src="<?php echo base_url();?>images/admin/delete.gif" alt="Delete" title="Delete" border="0">
                        </a>
                    </td>
                </tr>
    <?php
}
?>

            <tr>
                <td colspan="10">

                    <p>
                        <input class="button" name="submitDelcategory" value="Delete selection" onclick="return confirm('Delete selected items?');" type="submit">
                    </p>

                </td>
            </tr>
        </table>
    </div>
</form>
<?php echo $this->pagination->create_links(); ?>